using System;
using System.ComponentModel;
using System.Transactions;

using SIS.ENT;
using SIS.DAL;


/// <summary>
/// The EmployeeQualtificationTableManager class is responsible for managing BO.EmployeeQualtificationTable objects in the system.
/// </summary>
[DataObjectAttribute()]
public class EmployeeQualtificationTableManager
  {

#region "Public Methods"

/// <summary>
/// Gets a list with all EmployeeQualtificationTable objects in the database.
/// </summary>
/// <returns>A list with all EmployeeQualtificationTable from the database when the database contains any, or null otherwise.</returns>
[DataObjectMethod(DataObjectMethodType.Select, true)]
public static EmployeeQualtificationTableList GetList(){
return EmployeeQualtificationTableDB.GetList();
}

[DataObjectMethod(DataObjectMethodType.Select, true)]
public static EmployeeQualtificationTableList GetList(int UserAccountKey)
{
    return EmployeeQualtificationTableDB.GetListByUserAccountKey(UserAccountKey);
}

/// <summary>
/// Gets a single EmployeeQualtificationTable from the database without its data.
/// </summary>
/// <param name="employeeQualtificationKey">The EmployeeQualtificationKey of the EmployeeQualtificationTable in the database.</param>
/// <returns>A EmployeeQualtificationTable object when the EmployeeQualtificationKey exists in the database, or <see langword="null"/> otherwise.</returns>
[DataObjectMethod(DataObjectMethodType.Select, false)]
public static EmployeeQualtificationTable GetItem(int employeeQualtificationKey){
return GetItem(employeeQualtificationKey, false);
}

/// <summary>
/// Gets a single EmployeeQualtificationTable from the database.
/// </summary>
/// <param name="employeeQualtificationKey">The EmployeeQualtificationKey of the EmployeeQualtificationTable in the database.</param>
/// <param name="getEmployeeQualtificationTableRecords">Determines whether to load all associated EmployeeQualtificationTable records as well.</param>
/// <returns>
/// A EmployeeQualtificationTable object when the EmployeeQualtificationKey exists in the database, or <see langword="null"/> otherwise.
/// </returns>
[DataObjectMethod(DataObjectMethodType.Select, false)]
public static EmployeeQualtificationTable GetItem(int employeeQualtificationKey, bool getEmployeeQualtificationTableRecords){
EmployeeQualtificationTable myEmployeeQualtificationTable = EmployeeQualtificationTableDB.GetItem(employeeQualtificationKey);
return myEmployeeQualtificationTable;
}

/// <summary>
/// Saves a EmployeeQualtificationTable in the database.
/// </summary>
/// <param name="myEmployeeQualtificationTable">The EmployeeQualtificationTable instance to save.</param>
/// <returns>The new EmployeeQualtificationKey if the EmployeeQualtificationTable is new in the database or the existing EmployeeQualtificationKey when an item was updated.</returns>
[DataObjectMethod(DataObjectMethodType.Update, true)]
public static int Save(EmployeeQualtificationTable myEmployeeQualtificationTable){
using (TransactionScope myTransactionScope = new TransactionScope()){
int employeeQualtificationTableEmployeeQualtificationKey = EmployeeQualtificationTableDB.Save(myEmployeeQualtificationTable);

//  Assign the EmployeeQualtificationTable its new (or existing EmployeeQualtificationKey).
myEmployeeQualtificationTable.EmployeeQualtificationKey = employeeQualtificationTableEmployeeQualtificationKey;

myTransactionScope.Complete();

return employeeQualtificationTableEmployeeQualtificationKey;
}
}

/// <summary>
/// Deletes a EmployeeQualtificationTable from the database.
/// </summary>
/// <param name="myEmployeeQualtificationTable">The EmployeeQualtificationTable instance to delete.</param>
/// <returns>Returns true when the object was deleted successfully, or false otherwise.</returns>
[DataObjectMethod(DataObjectMethodType.Delete, true)]
public static bool Delete(EmployeeQualtificationTable myEmployeeQualtificationTable){
return EmployeeQualtificationTableDB.Delete(myEmployeeQualtificationTable.EmployeeQualtificationKey);
}

[DataObjectMethod(DataObjectMethodType.Delete, true)]
public static bool Delete(int EmployeeQualtificationKey)
{
    return EmployeeQualtificationTableDB.Delete(EmployeeQualtificationKey);
}


#endregion

}

